package com.humingbirdportabl;

import org.junit.jupiter.api.Test;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class test {
    @Test
    public void testEncoder() {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        String encode = encoder.encode("123456");
        System.out.println(encode);
    }

    @Test
    public void testDecoder() {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        boolean ok = encoder.matches("123456", "$2a$10$2Av0NEqdP6U7N5EksiVqLOLcOiut/2huG/lVPuK.40JNZbylv7jKC");
        System.out.println(ok);
    }
}
